package com.Rest2Go;

import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import android.widget.TextView;

public class CommentDialog extends Dialog
{

	private int		mMEUID;
	private View	mDishView;

	public CommentDialog(Context context, boolean cancelable, OnCancelListener cancelListener)
	{
		super(context, cancelable, cancelListener);
		// TODO Auto-generated constructor stub
	}

	public CommentDialog(Context context, int theme)
	{
		super(context, theme);
		// TODO Auto-generated constructor stub
	}

	public CommentDialog(Context context)
	{
		super(context);
		// TODO Auto-generated constructor stub
	}

	public CommentDialog(Context context, int meUID, View dishView)
	{
		super(context);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
		mMEUID = meUID;
		setContentView(R.layout.comment_dialog_layout);
		getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
		LinearLayout linear = (LinearLayout) findViewById(R.id.linear_parent);
		LayoutInflater infl = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		mDishView = infl.inflate(R.layout.menu_items, null);
		
		TextView dishName = (TextView) mDishView.findViewById(R.id.dish_name);
		TextView dishPrice = (TextView) mDishView.findViewById(R.id.dish_price);
		TextView dishDesc = (TextView) mDishView.findViewById(R.id.dish_spec);
		
		dishName.setText(((TextView) dishView.findViewById(R.id.dish_name)).getText());
		dishPrice.setText(((TextView) dishView.findViewById(R.id.dish_price)).getText());
		dishDesc.setText(((TextView) dishView.findViewById(R.id.dish_spec)).getText());
		
		
		linear.addView(mDishView, 0);

	}

}
